<div class="form">


    <?php
    $form = $this->beginWidget('GxActiveForm', array(
        'id' => 'state-form',
        'enableAjaxValidation' => true,
            ));
    ?>

    <p class="note">
        <?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
    </p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'name'); ?>
        </div>
        <div class="rowControl"><?php echo $form->textField($model, 'name', array('class' => 'input-xlarge')); ?>
            <?php echo $form->error($model, 'name'); ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'state_code'); ?>
        </div>
        <div class="rowControl"><?php echo $form->textField($model, 'state_code', array('class' => 'input-xlarge')); ?>
            <?php echo $form->error($model, 'state_code'); ?>
        </div><!-- row -->
    </div>



    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'country_id'); ?>
        </div>
        <div class="rowControl">
            <?php echo $form->dropDownList($model, 'country_id', CHtml::listData(Country::model()->findAllByAttributes(array('is_active' => '1')), 'id', 'name'), array('prompt' => ' --- Select Select Country name --- ', 'class' => 'selectbox')); ?>  

            <?php echo $form->error($model, 'country_id'); ?>
        </div><!-- row -->
    </div>
    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'is_active'); ?></div>
        <div class="rowControl"><?php echo $form->dropDownList($model, 'is_active', array("1" => "Active", "0" => "InActive"), array('class' => 'selectstatus')); ?>    
            <?php echo $form->error($model, 'is_active'); ?>
        </div><!-- row -->
    </div>


    <div class="row">
        <div class="rowLabel">&nbsp;</div>
        <?php
        echo GxHtml::submitButton(Yii::t('app', 'Save'), array('class' => 'btn btn btn-primary'));
        $this->endWidget();
        ?>
    </div>
</div>
<!-- form -->
